//将其他类型转换为string类型
// tostring函数 直接调用
var a=1;
console.log(a.toString(),typeof(a.toString()));
//字符串拼接或者直接写在单双引号中
var b=2 + '';
console.log(b,typeof b);
var c=false + '';
console.log(c,typeof c);
// Boolean
    //boole函数进行转换
    var d='hello';
    console.log(Boolean(d),typeof(Boolean(d)));
    var e=123;
    console.log(Boolean(e),typeof(Boolean(e)));
    var f=null;
    console.log(Boolean(f),typeof(Boolean(f)));
    //!!变量将其他类型转换为布尔类型
    var x='false';
    console.log(!!x,typeof(!!x));
    var y=12;
    console.log(!!y,typeof(!!y));
//number类型转换
    //number（）函数进行转换
    var h='hello';
    console.log(Number(h),typeof(Number(h)));
    var k=true;
    console.log(Number(k),typeof(Number(k)));
    var m=null;
    console.log(Number(m),typeof(Number(m)));
    //parseInt()
    var l='12.3';
    console.log(parseInt(l),typeof(parseInt(l)));
    //parseFloat()
    console.log(parseFloat(l),typeof(parseFloat(l)));